package acm.pta11;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        boolean isFirst = true;
        int first=-1;
        int count=0;
        int i = 1;
        for (; sc.hasNext(); i++) {
            String line = sc.nextLine();
            if (".".equals(line)) break;
            if (line.matches(".*chi1 huo3 guo1.*")) {
                count++;
                if (isFirst){
                    isFirst = false;
                    first=i;
                }
            }
        }
        System.out.println(i-1);
        if (isFirst){
            System.out.println("-_-#");
        }else {
            System.out.println(first+" "+count);
        }
    }
}
